package rudia.net.user.web;

import java.util.HashMap;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import rudia.org.core.RuMap;
import rudia.org.user.service.UserService;

@Controller
public class UserController {

	@Autowired
	private UserService userService;

	
	@RequestMapping("/user/list")
	public String list(HttpServletRequest request, RuMap rumap) {
		rumap.put("userList", userService.list(rumap));
		return "rudia/user/user/list";
	}
	
	@RequestMapping("/user/list.xls")
	public String listExcel(HttpServletRequest request, RuMap rumap) {
		rumap.put("userList", userService.list(rumap));
		return "rudia/user/user/list.xls";
	}

}
